import http from './http'
// 登录
export function login(username,password) {
    let urlParams = new URLSearchParams()
    urlParams.append("username",username)
    urlParams.append("password",password)
    urlParams.append("rememberMe",true)

    return http.post("/course-api/pcUser/login",urlParams)
}
//获取个人信息
export function getUserInfo(){
    return http.get("/course-api/pcUser/login-user/info")
}
//修改头像
export function changeAvatar(file){
    let form = new FormData()
    form.append("file",file)
    return http.post("/course-api/pcUser/updata/userAvatar",form)
}
//退出登录
export function logOut(){
    return http.get("/course-api/pcUser/logout")
}
